import React from 'react';

import styles from './index.less';
import SiteHeader from '../Components/SiteHeader';
import SiteFooter from '../Components/SiteFooter';
import { Layout } from 'antd';
import RegisterHeader from '@/Components/RegisterHeader';

const { Content } = Layout;

const BasicLayout: React.FC = (props) => {
  if (props.location.pathname === '/userRegister') {
    return (
      <Layout>
        <RegisterHeader />
        <Content className={styles.content}>{props.children}</Content>
        <SiteFooter />
      </Layout>
    );
  }
  return (
    <Layout>
      <SiteHeader />
      <Content className={styles.content}>{props.children}</Content>
      <SiteFooter />
    </Layout>
  );
};

export default BasicLayout;
